package day8;

/**
 * @author oldliu
 * @since 1.0
 */
public class Driver {
    String name;
    int age=30;
    public Driver(String n){
        this.name=n;
    }
    public void drive(Car c){
        System.out.println(name+"开着小轿车在马路上浪");
        c.run();
    }
    public void drive(Bus b){
        System.out.println(name+"开公交车糊口");
        b.work();
    }
    public void drive(Taxi t){
        System.out.println(name+"开出租车挣钱");
        t.go();
    }
}
